<template>
  <van-cell @click="thj" />
  <van-popup v-model:show="show" position="bottom" :style="{ height: '90%' }" closeable>
    <div class="success-dialog">
      <div class="pp">
        <van-image src="path_to_image/item.jpg" width="100" height="100" />
      </div>

      <h3>添加成功</h3>
      <p>您刚刚在早餐中添加了煎蛋卷。</p>
      <van-button type="primary" @click="$router.push('/')">确定</van-button>
    </div>
  </van-popup>
</template>
<script setup>
import { ref } from 'vue'
const show = ref(false)
function thj() {
  show.value = ref(true)
}
thj()
</script>
<style  scoped lang="css">
.success-dialog {
  text-align: center;
  padding: 20px;
}

.image-wrapper {
  position: relative;
  display: inline-block;
}

.image-wrapper::before,
.image-wrapper::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #ff5722;
  border-radius: 50%;
  animation: float 3s infinite;
}

.image-wrapper::before {
  top: -5px;
  left: 20%;
}

.image-wrapper::after {
  top: -5px;
  right: 20%;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

h3 {
  margin-top: 10px;
  font-weight: bold;
}
.pp {
  width: 180px;
  height: 180px;
  background-color: red;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto;
  border-radius: 50px;
}
p {
  color: #888;
  margin: 10px 0;
}

.van-button {
  margin-top: 80px;
  width: 68%;
}
.van-image {
  width: 100px;
  height: 100px;
  border-radius: 10px;
}
</style>
